package com.flurry.sdk;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.UUID;

public final class kz {
    String a;
    byte[] b;

    /* synthetic */ kz(byte b2) {
        this();
    }

    private kz() {
        this.a = null;
        this.b = null;
    }

    public static class a implements lg<kz> {
        public final /* synthetic */ Object a(InputStream inputStream) throws IOException {
            if (inputStream == null) {
                return null;
            }
            AnonymousClass2 r2 = new DataInputStream(inputStream) {
                public final void close() {
                }
            };
            kz kzVar = new kz((byte) 0);
            int readShort = r2.readShort();
            if (readShort == 0) {
                return null;
            }
            kzVar.b = new byte[readShort];
            r2.readFully(kzVar.b);
            r2.readUnsignedShort();
            return kzVar;
        }

        public final /* synthetic */ void a(OutputStream outputStream, Object obj) throws IOException {
            kz kzVar = (kz) obj;
            if (outputStream != null && kzVar != null) {
                AnonymousClass1 r0 = new DataOutputStream(outputStream) {
                    public final void close() {
                    }
                };
                r0.writeShort(kzVar.b.length);
                r0.write(kzVar.b);
                r0.writeShort(0);
                r0.flush();
            }
        }
    }

    public kz(byte[] bArr) {
        this.a = null;
        this.b = null;
        this.a = UUID.randomUUID().toString();
        this.b = bArr;
    }

    public static String a(String str) {
        return ".yflurrydatasenderblock." + str;
    }
}
